<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org" lang="zh_CN">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
  <!-- <link href="http://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> -->
  <!-- <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
  -->
  <meta name="viewport" content="width=device-width, initial-scale=1"/>

  <!-- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.6/css/materialize.min.css"/> -->
  <link rel="stylesheet" href="/css/materialize.min.css"/>

  <link rel="stylesheet" href="/css/comm100-new.css"/>

  <title>Comm100 - 高效在线客服系统解决方案</title>

</head>
<body>
<ul id="userDropdown" class="dropdown-content">
  <li><a th:if="${userName}" th:text="${userName}" href="/user/basic">用户主页</a></li>
  <li class="divider"></li>
  <li>
    <form th:action="@{/logout}" method="post">
      <input type="submit" class="btn" value="退出"/>
    </form>
  </li>
</ul>
<nav class="top-nav z-depth-2">
  <div class="nav-wrapper white">
    <div class="brand-logo">
      <a href="/" class="logo-link"><img class="logo-img" src="/img/Comm100_logo.png"/></a>
      <span class="brand-title">高效在线客服系统</span>
    </div>
    <ul id="nav-mobile" class="right hide-on-med-and-down" style="">
      <li><a href="javascript:;" class="login-button" th:if="${notLogin}">登录</a></li>
      <li>
        <a href="javascript:;" class="register-button waves-effect waves-light btn" th:if="${notLogin}">注册</a>
      </li>
      <li><a class="dropdown-button" href="#!" th:if="${userName}" th:text="${userName}"
             data-activates="userDropdown">用户名</a></li>
    </ul>
  </div>
</nav>

<div class="container main-container row">
  <div class="side-bar col s2">
    <ul class="config-nav-list z-depth-1">
      <li class="config-nav-item active">
        <a href="/user/basic">基本信息</a>
      </li>
      <li class="config-nav-item">
        <a href="/user/serviceManage">客服管理</a>
      </li>
      <li class="config-nav-item">
        <a href="/user/imgConfig">自定义</a>
      </li>
      <li class="config-nav-item">
        <a href="/user/report">报告</a>
      </li>
    </ul>
  </div>
  <div class="config-content col s10">
    <div class="siteCode-info col s12">
      <h5>您的站点编号：</h5>
      <span th:text="${coUser.siteCode}">8位站点编号</span>
    </div>
    <div class="iframecode-info col s12">
      <p class="iframecode-descript"><b>将此行代码粘贴到您的网页</b></p>
      <div class="iframecode-wrap col s7 z-depth-1">
        <a href="javascript:;" class="copy-button" title="点击复制"><i class="iconfont ">&#xe601;</i></a>
        <p class="iframcode-text"
           th:text="' &lt;iframe style=&quot;position: fixed; top: 0; width: 100%; height: 100%; z-index: 100; border: none; overflow: hidden;&quot;src=&quot;http://custom.comm100.lsu.pw/custom/' + ${coUser.siteCode} + '&quot;&gt;&lt;/iframe&gt;'">
          iframe代码
        </p>
      </div>
    </div>
    <div class="serviceurl-info col s12">
      <p class="serviceurl-descript"><b>客服登录入口</b></p>
      <div class="serviceurl-wrap col s7 z-depth-1">
        <a href="javascript:;" class="copy-button" title="点击复制"><i class="iconfont ">&#xe601;</i></a>
        <p class="serviceurl-text" th:text="'http://service.comm100.lsu.pw/service/' + ${coUser.siteCode}">
          http://comm100.lsu.pw/service/</p>
      </div>
    </div>
  </div>
</div>
<script src="/js/jquery-1.7.2.min.js"></script>
<script src="/js/materialize.min.js"></script>
<script src="/js/comm100-new.js"></script>
<script>
   $(document).ready(function() {
    $(".copy-button").click(function() {
      var iframeTextElement = $(this).parent().children("p")[0];
      copyToClipboard(iframeTextElement);
    });

  });

</script>
</body>
</html>